package com.yzt.zhuju.network.biz;


import com.alibaba.fastjson.JSONObject;
import com.yzt.zhuju.network.NetLayer;
import com.yzt.zhuju.network.apiconfig.ChatRoomUrlConstant;
import okhttp3.RequestBody;
import rx.Observable;
import rx.Observer;

/**
 * author : bob
 * date   : 2022/12/6
 * desc   : 聊天室模块
 */
public class ChatRoomModule extends BaseModule {

    /**
     * 意见反馈
     *
     * @param style   反馈类型
     * @param content 反馈内容
     * @param imgUrl  反馈的图片
     */
    public void postUploadChatRoomFeedBack(String style, String content, String imgUrl, String machineModel, Observer observer) {
        JSONObject json = new JSONObject();
        json.put("style", style);
        json.put("content", content);
        json.put("imgUrl", imgUrl);
        json.put("machineModel", machineModel);
        RequestBody mRequestBody = getRequestBody(json);

        Observable observable = NetLayer.getInstance().getChatRoomService().postUploadChatRoomFeedBack(mRequestBody);
        toSubscribe2Filter(observable, observer, ChatRoomUrlConstant.POST_UPLOAD_FEED_BACK);
    }


}
